package cn.enjoy.canal.handler;

import cn.enjoy.canal.entity.Blog;
import org.springframework.stereotype.Component;
import top.javatool.canal.client.annotation.CanalTable;
import top.javatool.canal.client.handler.EntryHandler;

/**
 * @author K
 * @date 2023-05-25 15:03
 */
@Component
@CanalTable(value = "blade_blog")
public class BlogHandler implements EntryHandler<Blog> {

    @Override
    public void insert(Blog blog) {
        System.err.println("添加：" + blog);
    }

    @Override
    public void update(Blog before, Blog after) {
        System.err.println("改前：" + before);
        System.err.println("改后：" + after);

    }
    @Override
    public void delete(Blog blog) {
        System.err.println("删除：" + blog);
    }
}
